5 function procesar(n : integer) : integer;
\r
7 tabla : Array[0..9] of integer;
\r
8 carry, multiplo, i, ultimaCifra : integer;
\r
19 while tabla[multiplo] mod 10 <> ultimaCifra do
\r
20 multiplo := multiplo + 1;
\r
22 carry := (n * multiplo + carry) div 10;
\r
24 result := result + 1;
\r
27 while (i mod 10 <> 1) do
\r
29 ultimaCifra := i - carry;
\r
40 writeLn(procesar(n));
\r